-- 菜单

INSERT INTO `sys_menu` (`parent_id`, `name`, `type`, `sort`, `path`, `component`, `query`, `is_frame`, `is_cache`, `visible`, `status`,`sign`, `icon`, `del_flag`, `created_by`, `created_at`, `updated_by`, `updated_at`)
VALUES (${table.menuId?c}, '${table.tableComment}', 'C', 1,'<#if table.moduleName??>${table.moduleName}/</#if>${table.classNameLowerFirst}','<#if table.moduleName??>${table.moduleName}/</#if>${table.classNameLowerFirst}/index', '', b'0', b'0', b'0', '1','${table.sign}$:list', 'file', 0, 1, now(), 1, now());

-- 父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 功能按钮

INSERT INTO `sys_menu` (`parent_id`, `name`, `type`, `sort`, `path`, `component`, `query`, `is_frame`, `is_cache`, `visible`, `status`,`sign`, `icon`, `del_flag`, `created_by`, `created_at`, `updated_by`, `updated_at`)
VALUES (@parentId, '${table.tableComment}查询', 'F', 1,'#','#', '', b'0', b'0', b'0', '1','${table.sign}$:query', 'file', 0, 1, now(), 1, now());

INSERT INTO `sys_menu` (`parent_id`, `name`, `type`, `sort`, `path`, `component`, `query`, `is_frame`, `is_cache`, `visible`, `status`,`sign`, `icon`, `del_flag`, `created_by`, `created_at`, `updated_by`, `updated_at`)
VALUES (@parentId, '${table.tableComment}新增', 'F', 1,'#','#', '', b'0', b'0', b'0', '1','${table.sign}$:add', 'file', 0, 1, now(), 1, now());

INSERT INTO `sys_menu` (`parent_id`, `name`, `type`, `sort`, `path`, `component`, `query`, `is_frame`, `is_cache`, `visible`, `status`,`sign`, `icon`, `del_flag`, `created_by`, `created_at`, `updated_by`, `updated_at`)
VALUES (@parentId, '${table.tableComment}修改', 'F', 1,'#','#', '', b'0', b'0', b'0', '1','${table.sign}$:edit', 'file', 0, 1, now(), 1, now());

INSERT INTO `sys_menu` (`parent_id`, `name`, `type`, `sort`, `path`, `component`, `query`, `is_frame`, `is_cache`, `visible`, `status`,`sign`, `icon`, `del_flag`, `created_by`, `created_at`, `updated_by`, `updated_at`)
VALUES (@parentId, '${table.tableComment}删除', 'F', 1,'#','#', '', b'0', b'0', b'0', '1','${table.sign}$:remove', 'file', 0, 1, now(), 1, now());

INSERT INTO `sys_menu` (`parent_id`, `name`, `type`, `sort`, `path`, `component`, `query`, `is_frame`, `is_cache`, `visible`, `status`,`sign`, `icon`, `del_flag`, `created_by`, `created_at`, `updated_by`, `updated_at`)
VALUES (@parentId, '${table.tableComment}导出', 'F', 1,'#','#', '', b'0', b'0', b'0', '1','${table.sign}$:export', 'file', 0, 1, now(), 1, now());
